#!/usr/bin/env bash

# Prerequisites: You must at least run `dfx start` and `dfx canister create wallet`
# in your cycles-wallet workspace

set -e

CYCLES_WALLET_DIR=${1?"Must specify path to a cycles-wallet workspace"}

(
    cd "${CYCLES_WALLET_DIR}"
    dfx build wallet
)

cp "${CYCLES_WALLET_DIR}"/.dfx/local/canisters/wallet/wallet.wasm wallet.wasm
cp "${CYCLES_WALLET_DIR}"/.dfx/local/canisters/wallet/wallet.did wallet.did

